package com.backom.example.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.backom.example.domain.LoginLog;

@Repository
public class LoginLogDao {

	@Autowired
	private JdbcTemplate jdbcTemplate;
	public void insertLoginLog(LoginLog log) {
		String sqlStr = "INSERT INTO t_login_log (user_id,ip,login_date) "
				+"VALUES(?,?,?)";
		Object[] args = new Object[]{log.getUserId(),log.getIp(),log.getLoginDate()};
		jdbcTemplate.update(sqlStr);
	}
	
}
